# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.DigitalAssetLinks.V1.Model.BulkCheckRequest do
  @moduledoc """
  Message used to check for the existence of multiple digital asset links within a single RPC.

  ## Attributes

  *   `defaultRelation` (*type:* `String.t`, *default:* `nil`) - If specified, will be used in any given template statement that doesn’t specify a relation.
  *   `defaultSource` (*type:* `GoogleApi.DigitalAssetLinks.V1.Model.Asset.t`, *default:* `nil`) - If specified, will be used in any given template statement that doesn’t specify a source.
  *   `defaultTarget` (*type:* `GoogleApi.DigitalAssetLinks.V1.Model.Asset.t`, *default:* `nil`) - If specified, will be used in any given template statement that doesn’t specify a target.
  *   `returnRelationExtensions` (*type:* `boolean()`, *default:* `nil`) - Same configuration as in CheckRequest; all statement checks will use the same configuration.
  *   `statements` (*type:* `list(GoogleApi.DigitalAssetLinks.V1.Model.StatementTemplate.t)`, *default:* `nil`) - List of statements to check. For each statement, you can omit a field if the corresponding default_* field below was supplied. Minimum 1 statement; maximum 1,000 statements. Any additional statements will be ignored.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :defaultRelation => String.t() | nil,
          :defaultSource => GoogleApi.DigitalAssetLinks.V1.Model.Asset.t() | nil,
          :defaultTarget => GoogleApi.DigitalAssetLinks.V1.Model.Asset.t() | nil,
          :returnRelationExtensions => boolean() | nil,
          :statements => list(GoogleApi.DigitalAssetLinks.V1.Model.StatementTemplate.t()) | nil
        }

  field(:defaultRelation)
  field(:defaultSource, as: GoogleApi.DigitalAssetLinks.V1.Model.Asset)
  field(:defaultTarget, as: GoogleApi.DigitalAssetLinks.V1.Model.Asset)
  field(:returnRelationExtensions)
  field(:statements, as: GoogleApi.DigitalAssetLinks.V1.Model.StatementTemplate, type: :list)
end

defimpl Poison.Decoder, for: GoogleApi.DigitalAssetLinks.V1.Model.BulkCheckRequest do
  def decode(value, options) do
    GoogleApi.DigitalAssetLinks.V1.Model.BulkCheckRequest.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.DigitalAssetLinks.V1.Model.BulkCheckRequest do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
